.TH deductionguidesforstd::pair 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
deductionguidesforstd::pair \- deductionguidesforstd::pair

.SH Synopsis
   Defined in header <utility>
   template<class T1, class T2>   \fI(since C++17)\fP
   pair(T1, T2) -> pair<T1, T2>;

   One deduction guide is provided for std::pair to account for the edge cases missed
   by the implicit deduction guides, in particular, non-copyable arguments and array to
   pointer conversion.

.SH Example


// Run this code

 #include <utility>

 int main()
 {
     int a[2], b[3];
     std::pair p{a, b}; // explicit deduction guide is used in this case
 }
